<template>
	<div class="goodsdesc-container">
		<h3>{{ shop.name }}</h3>
		<hr>
		<div class="content">
			<img :src="shop.images[0]">
			<div>			
				<a :href="shop.link">了解更多 ></a>				
			</div>			
		</div>
	</div>
</template>

<script>
	import { Toast } from 'mint-ui';
	export default {
		data:function  () {
			return {
				id:this.$route.params.id,
				shop:{}
			}
		},
		methods:{
			getshop(){
				console.log("here")
				this.$http.get("2/shops?id="+this.id).then((result)=>{
					if(result.body){
						this.shop = result.body[0];
					}else{
						Toast("数据获取失败！")
					}
				})
			}
		},
		created(){
			this.getshop();
			console.log(this.id)
		}
	}
</script>

<style lang="scss" scoped>
	.goodsdesc-container {
		padding: 4px;

		h3 {
			font-size: 16px;
			color: #226aff;
			text-align: center;
			margin: 15px 0px;
		}
		.content {
			img {
				width: 100%;
			}
			div a {
				float: right;
			}
		}
	}
</style>